import _ajax from '@/api/request'
// 登陆
function authorizations (data) {
  return _ajax({
    url: '/app/v1_0/authorizations',
    method: 'post',
    needToken: true,
    data
  })
}
// 获取用户信息
function user (data) {
  return _ajax({
    url: '/app/v1_0/user',
    needToken: true
  })
}
// 刷新token
function refreshToken (data) {
  return _ajax({
    url: '/app/v1_0/authorizations',
    method: 'put',
    params: data
  })
}
export { authorizations, user, refreshToken }
